using System;
using System.Collections.Generic;
using System.Text;

namespace MindFactorial.LaunchPoint.Common
{
    /// <summary>
    /// Represents a base class for all entity encapsulators.  It simply provides the ability to 
    /// access the encapsulated entity in a generic manner.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public abstract class EntityEncapsulator<T> : LaunchPointObject where T: IDataEntity, new()
    {
        T _entity;

        /// <summary>
        /// creates a new entity encapsulator
        /// </summary>
        public EntityEncapsulator()
        {
            _entity = new T();
            
        }

        /// <summary>
        ///gets the encapsulated entity
        /// </summary>
        public T Entity
        {
            get
            {
                return _entity;
            }
        }
    }
}
